<?php
/**
 * Created by PhpStorm.
 * User: Qch
 * Date: 2016/8/13
 * Time: 17:04
 */

// 定义内核目录
define('__LIB__', __DIR__);
//获取方式
defined('__OPTION__') or define('__OPTION__','');

error_reporting(E_ALL);

define('VERSION', '5.0.2');
define('START_TIME', microtime(true));
define('START_MEM', memory_get_usage());
define('DS', DIRECTORY_SEPARATOR);

define('EXT', '.php');
defined('DEFAULT_MODULE_NAMESPACE') or define('DEFAULT_MODULE_NAMESPACE','Application');
defined('DEFAULT_MODULE_DIR') or define('DEFAULT_MODULE_DIR',dirname(__LIB__));
defined('DEFAULT_VIR') or define('DEFAULT_VIR',DEFAULT_MODULE_DIR. DS . 'Application/Views');
defined('DEFAULT_TIR') or define('DEFAULT_TIR',__APP__.DS.'TEMP');

defined('INSTALL_PATH') or define('INSTALL_PATH', 'Install/Index/Index');
defined('LOCK') or define('LOCK', RUNTIME_PATH .DS . '.lock');


// defined('VENDOR_PATH') or define('VENDOR_PATH', __LIB__ . 'vendor' . DS);
// defined('LOG_PATH') or define('LOG_PATH', RUNTIME_PATH . DS .'log');
// defined('CACHE_PATH') or define('CACHE_PATH', RUNTIME_PATH . DS .'cache');


defined('CONF_EXT') or define('CONF_EXT', EXT); // 配置文件后缀

// 环境常量
define('IS_CLI', PHP_SAPI == 'cli');
define('IS_WIN', strpos(PHP_OS, 'WIN') !== false);


include_once("common/function.php");
include_once("common/common.php");

include_once("Loader.php");
$loader = new \J\Loader;
$loader->register();
// 框架内核前缀
$loader->addNamespace('J', dirname(__LIB__));

// include_once "common/shortcut.php";
app()->bootstrap($loader);
